<template>
  <div>
    <h2>首页</h2>
    <button @click="fn">打印</button>
    <p>
        <!-- 取值 -->
      {{ $route.query }}
    </p>

    <p>
        <!-- 取值 -->
      {{ $route.params }}
    </p>
  </div>
</template>

<script>
export default {
  methods: {
    fn () {
      console.log(this.$route)
    }
  }
}
</script>

<style></style>
